package com.xyw.his00.config;

import com.xyw.his00.interceptor.JWTInterceptor;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Component
public class InterceptorConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
       registry.addInterceptor(new JWTInterceptor()).
                excludePathPatterns("/login").
                excludePathPatterns("/logout").
               excludePathPatterns("/employee/getEmployeesDeptIdAndName").
               excludePathPatterns("/alipay/pay/**")
               .excludePathPatterns("/disease/**")
               .excludePathPatterns("/selectById")
               .excludePathPatterns("/file/**")
       ;

    }
}
